package com.bao.system.service.impl;

import com.bao.system.entity.Entity;
import com.bao.system.mapper.EntityMapper;
import com.bao.system.service.EntityService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author bao
 * @since 2021-06-09
 */
@Service
public class EntityServiceImpl extends ServiceImpl<EntityMapper, Entity> implements EntityService {

    @Autowired
    EntityMapper entityMapper;

    @Override
    public IPage<Entity> findEntityPage(Page<Entity> page, QueryWrapper<Entity> wrapper) {
        return entityMapper.findEntityPage(page, wrapper);
    }

    @Override
    public void deleEntity(Integer id) {
        entityMapper.deleEntity(id);
    }

    @Override
    public void examineEntity(Integer id) {
        entityMapper.examineEntity(id);
    }

    @Override
    public void addEntity(Entity entity) {
        entityMapper.addEntity(entity);
    }
}
